use MediaWiki\Permissions\PermissionManager;
use MediaWiki\Revision\SlotRecord;
use Wikimedia\Rdbms\IDatabase;
-use Wikimedia\Rdbms\LoadBalancer;
+use Wikimedia\Rdbms\ILoadBalancer;
/**
* Handles the backend logic of moving a page from one title
protected $options;
/**
- * @var LoadBalancer
+ * @var ILoadBalancer
*/
protected $loadBalancer;
protected $nsInfo;
/**
- * @var WatchedItemStore
+ * @var WatchedItemStoreInterface
*/
protected $watchedItems;
* @param Title $oldTitle
* @param Title $newTitle
* @param ServiceOptions|null $options
- * @param LoadBalancer|null $loadBalancer
+ * @param ILoadBalancer|null $loadBalancer
* @param NamespaceInfo|null $nsInfo
* @param WatchedItemStore|null $watchedItems
* @param PermissionManager|null $permMgr
Title $oldTitle,
Title $newTitle,
ServiceOptions $options = null,
- LoadBalancer $loadBalancer = null,
+ ILoadBalancer $loadBalancer = null,
NamespaceInfo $nsInfo = null,
- WatchedItemStore $watchedItems = null,
+ WatchedItemStoreInterface $watchedItems = null,
PermissionManager $permMgr = null,
RepoGroup $repoGroup = null
) {
'LocalServerObjectCache' => function ( MediaWikiServices $services ) : BagOStuff {
$config = $services->getMainConfig();
- $cacheId = \ObjectCache::detectLocalServerCache();
+ $cacheId = ObjectCache::detectLocalServerCache();
- return \ObjectCache::newFromParams( $config->get( 'ObjectCaches' )[$cacheId] );
+ return ObjectCache::newFromParams( $config->get( 'ObjectCaches' )[$cacheId] );
},
'LockManagerGroupFactory' => function ( MediaWikiServices $services ) : LockManagerGroupFactory {
"Cache type \"$id\" is not present in \$wgObjectCaches." );
}
- return \ObjectCache::newFromParams( $mainConfig->get( 'ObjectCaches' )[$id] );
+ return ObjectCache::newFromParams( $mainConfig->get( 'ObjectCaches' )[$id] );
},
'MainWANObjectCache' => function ( MediaWikiServices $services ) : WANObjectCache {
}
$params['store'] = $mainConfig->get( 'ObjectCaches' )[$objectCacheId];
- return \ObjectCache::newWANCacheFromParams( $params );
+ return ObjectCache::newWANCacheFromParams( $params );
},
'MediaHandlerFactory' => function ( MediaWikiServices $services ) : MediaHandlerFactory {
// 'class' and 'preprocessorClass'
$services->getMainConfig()->get( 'ParserConf' ),
// Make sure to have defaults in case someone overrode ParserConf with something silly
- [ 'class' => Parser::class,
- 'preprocessorClass' => Parser::getDefaultPreprocessorClass() ],
+ [ 'class' => Parser::class, 'preprocessorClass' => Preprocessor_Hash::class ],
// Plus a buch of actual config options
$services->getMainConfig()
);
use RepoGroup;
use Title;
use WatchedItemStore;
-use Wikimedia\Rdbms\LoadBalancer;
+use WatchedItemStoreInterface;
+use Wikimedia\Rdbms\ILoadBalancer;
/**
* @since 1.34
/** @var ServiceOptions */
private $options;
- /** @var LoadBalancer */
+ /** @var ILoadBalancer */
private $loadBalancer;
/** @var NamespaceInfo */
public function __construct(
ServiceOptions $options,
- LoadBalancer $loadBalancer,
+ ILoadBalancer $loadBalancer,
NamespaceInfo $nsInfo,
- WatchedItemStore $watchedItems,
+ WatchedItemStoreInterface $watchedItems,
PermissionManager $permMgr,
RepoGroup $repoGroup
) {